<script>
import {defineComponent} from 'vue'
import useCount from "@/hooks/useCount";

export default defineComponent({
  name: "left",
  setup() {
    let {count, add, sub} = useCount()
    return {
      count,
      add,
      sub
    }
  }
})
</script>

<template>
  <div class="left">
    <h1>left组件的count值是：{{count}}</h1>
    <button @click="add">+1</button>
    <button @click="sub">-1</button>
  </div>
</template>

<style scoped lang="less">

</style>
